﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'SearchAreas')
	BEGIN
		DROP  Procedure  SearchAreas
	END

GO

CREATE Procedure SearchAreas

	(
		@nombre nvarchar(50)
	)

AS

BEGIN
	SET NOCOUNT ON
	
	SELECT
	[Descripcion],
	[IdArea],
	[IdAreaSuperior],
	[IdSucursal],
	[Nombre]
	FROM [Area] 
	WHERE [Nombre] LIKE (@nombre + N'%')

	SET NOCOUNT OFF
END

GO


GRANT EXEC ON SearchAreas TO PUBLIC

GO


